package com.example.curriculum.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.persistence.*;
import java.time.LocalDate;

@Table(name = "InBound")
@Entity
public class InBound {
    @Id
    @Column(name = "OrderId")
    @JsonProperty("order_id")
    private String order_id; // 订单号
    @Column(name = "UserId")
    @JsonProperty("user_id")
    private String user_id; // 用户id
    @Column(name = "PlateId")
    @JsonProperty("plate_id")
    private String plate_id; // 车牌号
    @Column(name = "QteIn")
    @JsonProperty("qte_in")
    private Double qte_in; // 入库件数
    @Column(name = "WeightIn")
    @JsonProperty("weight_in")
    private Double weight_in; // 入库吨数
    @Column(name = "TimeIn")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate time_in; // 入库时间

    public InBound() {
    }

    public InBound(String order_id, String user_id, String plate_id, Double qte_in, Double weight_in, LocalDate time_in) {
        this.order_id = order_id;
        this.user_id = user_id;
        this.plate_id = plate_id;
        this.qte_in = qte_in;
        this.weight_in = weight_in;
        this.time_in = time_in;
    }

    public String getOrder_id() {
        return order_id;
    }

    public void setOrder_id(String order_id) {
        this.order_id = order_id;
    }

    public String getUser_id() {
        return user_id;
    }

    public void setUser_id(String user_id) {
        this.user_id = user_id;
    }

    public String getPlate_id() {
        return plate_id;
    }

    public void setPlate_id(String plate_id) {
        this.plate_id = plate_id;
    }

    public Double getQte_in() {
        return qte_in;
    }

    public void setQte_in(Double qte_in) {
        this.qte_in = qte_in;
    }

    public Double getWeight_in() {
        return weight_in;
    }

    public void setWeight_in(Double weight_in) {
        this.weight_in = weight_in;
    }

    public LocalDate getTime_in() {
        return time_in;
    }

    public void setTime_in(LocalDate time_in) {
        this.time_in = time_in;
    }

    @Override
    public String toString() {
        return "InBound{" +
                "order_id='" + order_id + '\'' +
                ", plate_id='" + plate_id + '\'' +
                ", qte_in=" + qte_in +
                ", weight_in=" + weight_in +
                ", time_in=" + time_in +
                '}';
    }
}
